<!DOCTYPE html>
<html lang="en" class="bg-dark">
<head>
    <meta charset="utf-8"/>
    <title>秦岭云企业站后台管理系统</title>
    <meta name="description"content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link href="/static/admin1/bootstrap-3.3.0-dist/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/admin1/admin.ui/css/animate.css" type="text/css"/>
    <link rel="stylesheet" href="/static/admin1/admin.ui/css/app.css" type="text/css"/>
    <!--[if lt IE 9]>
    <script src="/static/admin1/admin.ui/js/ie/html5shiv.js"></script>
    <script src="/static/admin1/admin.ui/js/ie/respond.min.js"></script>
    <script src="/static/admin1/admin.ui/js/ie/excanvas.js"></script>
    <![endif]-->
</head>
<body class="">
<section id="content" class="m-t-lg wrapper-md animated fadeInUp">
    <div class="container aside-xxl">
        <a class="navbar-brand block" href="">秦岭云企业站后台管理</a>
        <section class="panel panel-default bg-white m-t-lg">
            <header class="panel-heading text-center">
                <strong>管理员后台登陆</strong>
            </header>
           <form method="post" action="" class="panel-body wrapper-lg">
                <div class="form-group">
                    <label class="control-label">用户名</label>
                    <input  id="username" type="text" class="form-control input-lg" name="admin_username">
                </div>
                <div class="form-group">
                    <label class="control-label">密 码</label>
                    <input  id="password" type="password"  class="form-control input-lg" name="admin_password">
                </div>
                <div class="form-group">
                    <label class="control-label">验证码</label>
                    <input id="verify" type="text"  class="form-control input-lg col-md-6" name="code">
                    <img src="{:captcha_src()}" alt="captcha" onclick="this.src=this.src+'?'+Math.random()"/>
                   
                </div>
                <button type="button" class="btn btn-primary"  onclick="show();">登陆后台</button>
           </form>
        </section>
    </div>
</section>
<!-- footer -->
<footer id="footer">
    <div class="text-center padder">
        <p>
            <small>Powered By www.chinglingcloud.com<br> copyright &copy; 2017</small>
        </p>
    </div>
</footer>
<script src="/static/admin1/admin.ui/js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="/static/admin1/admin.ui/js/bootstrap.js"></script>
<!-- App -->
<script src="/static/admin1/admin.ui/js/app.js"></script>
<script src="/static/admin1/admin.ui/js/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/admin1/admin.ui/js/app.plugin.js"></script>
<script src="/static/admin1/dialog/dialog/layer.js"></script>
<script src="/static/admin1/dialog/dialog.js"></script>
<script type="text/javascript">
function show(){
var username=$("#username").val();
var password=$("#password").val();
var yzcode=$("#verify").val();
var admin_url="{:url('admin/index/index')}";

if(username.length<2){
dialog.error("用户名不能为空！");
}else if(password.length<1){
dialog.error("密码不能为空！");
}
else if(yzcode.length<1){
dialog.error("验证码不能为空！");
}
else{
$.post('{:url("admin/login/check")}',{'admin_username':username,'admin_password':password,'code':yzcode},function(data){
if(data.status==0){
dialog.error(data.message);
}else if(data.status==1){
dialog.success(data.message,admin_url);
}
},'JSON');
}
}
</script>
</body>
</html>